| Conditions | 1 |
| Total Lines | 21 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { NestFactory } from '@nestjs/core'; |
||
| 6 | |||
| 7 | async function bootstrap() { |
||
| 8 | const app = await NestFactory.create(AppModule); |
||
| 9 | app.use(helmet()); |
||
| 10 | app.enableCors(); |
||
| 11 | app.setGlobalPrefix('api'); |
||
| 12 | app.useGlobalPipes(new ValidationPipe({ transform: true })); |
||
| 13 | |||
| 14 | const options = new DocumentBuilder() |
||
| 15 | .setTitle('Permacoop') |
||
| 16 | .setDescription( |
||
| 17 | 'PermaCoop is an eco-design and open-source ERP solution for cooperatives.' |
||
| 18 | ) |
||
| 19 | .setVersion('1.0.0') |
||
| 20 | .addBearerAuth() |
||
| 21 | .build(); |
||
| 22 | |||
| 23 | const document = SwaggerModule.createDocument(app, options); |
||
| 24 | SwaggerModule.setup('api', app, document); |
||
| 25 | |||
| 26 | await app.listen(3000, '0.0.0.0'); |
||
| 27 | } |
||
| 30 |